Hierarchical Modularity and Intermodule Optimization

نویسندگان

  • MATTHIAS BLUME
  • Douglas Clark
  • Edward Felten
  • David Hanson
چکیده

Separate compilation is an important tool for coping with design complexity in large software projects. When done right it can also be used to create software libraries, thus promoting code reuse. But separate compilation comes in various flavors and has many facets: namespace management, linking, optimization, dependencies. Many programming languages identify modular units with units of compilation, while only a few extend this to permit hierarchies of language-level modules within individual compilation units. When the number of compilation units is large, then it becomes increasingly important that the mechanism of separate compilation itself can be used to control namespaces. The group model implemented in SML/NJ’s compilation manager CM provides the necessary facilities to avoid unwanted interferences between unrelated parts of large programs. Compilation units are arranged into groups, and explicit export interfaces can be used to control namespaces. When there are many groups, they can be organized into supergroups, and so on, thus forming a hierarchical modular structure. CM provides automatic dependency analysis, but automatic dependency analysis is NP-hard for general SML code. We show two simple restrictions that avoid intractability. To remove the penalties for efficiency usually incurred by modularization and separate compilation, I designed an algorithm for automatic inline expansion across compilation unit boundaries that works in the presence of higher-order functions and free variables; it rearranges bindings and scopes as necessary to move non-expansive code from one module to another. I describe—and implement—the algorithm as transformations on λ-calculus. The inliner is efficient, robust, and practical enough for everyday use in the SML/NJ compiler. It preserves separate compilation and has been integrated with CM. I briefly investigate macro systems as an alternative approach—driven by programmer

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Modular Interdependency in Complex Dynamical Systems

Herbert A. Simon's characterization of modularity in dynamical systems describes subsystems as having dynamics that are approximately independent of those of other subsystems (in the short term). This fits with the general intuition that modules must, by definition, be approximately independent. In the evolution of complex systems, such modularity may enable subsystems to be modified and adapte...

متن کامل

Maximum Maintainability of Complex Systems via Modulation Based on DSM and Module Layout.Case Study:Laser Range Finder

The present paper aims to investigate the effects of modularity and the layout of subsystems and parts of a complex system on its maintainability. For this purpose, four objective functions have been considered simultaneously: I) maximizing the level of accordance between system design and optimum modularity design,II) maximizing the level of accessibility and the maintenance space required,III...

متن کامل

Modularity-based Clustering for Network-constrained Trajectories

We present a novel clustering approach for moving object trajectories that are constrained by an underlying road network. The approach builds a similarity graph based on these trajectories then uses modularity-optimization hiearchical graph clustering to regroup trajectories with similar profiles. Our experimental study shows the superiority of the proposed approach over classic hierarchical cl...

متن کامل

A Model Based Metaheuristic for Hybrid Hierarchical Community Structure in Social Networks

In recent years, the study of community detection in social networks has received great attention. The hierarchical structure of the network leads to the emergence of the convergence to a locally optimal community structure. In this paper, we aim to avoid this local optimum in the introduced hybrid hierarchical method. To achieve this purpose, we present an objective function where we incorpora...

متن کامل

Efficient modularity optimization by self-avoiding walk

Different kinds of random walks have showed to be useful in the study of the structural properties of complex networks. Among them, the restricted dynamics of the self-avoiding random walk (SAW), which reaches only unvisited vertices in the same walk, has been succesfully used in network exploration. SAWs are therefore a promising tool to investigate community structures in networks. Despite it...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997